

public class Argument {

	//This class was implemented as a part of an abandoned approach
	//this class allows the Plumber to set arguments for the corrector file
	/*
	long argValue;
	Measurement measurement;
	RelationalOperator operator;
	Argument(Measurement measurement, RelationalOperator operator, double argValue){
		this.measurement = measurement;
		this.operator = operator;
		this.argValue = Double.doubleToLongBits(argValue);
	}
	Argument(Measurement measurement, RelationalOperator operator, long argValue){
		this.measurement = measurement;
		this.operator = operator;
		this.argValue = argValue;
	}
	Measurement getMeasurement(){
		 return measurement;
	}
	RelationalOperator getOperator(){
		return operator;
	}
	long getLongValue(){
		return argValue;
	}
	double getDoubleValue(){
		return Double.longBitsToDouble(argValue);
	}
	
	//checks an incoming value to see if it passes the argument
	//arguments of the incorrect measurement type are automatically passed
	boolean doubleValPassArgument(Measurement measurement, double doubleVal){
		if(measurement!=this.measurement){
			return true;
		}
		long val = Double.doubleToLongBits(doubleVal);
		if (operator==RelationalOperator.GREATER_THAN){
			if (val > argValue){
				return true;
			}
		}
		else if(operator==RelationalOperator.LESS_THAN){
			if(val < argValue){
				return true;
			}
		}
		else if (operator==RelationalOperator.LESS_THAN){
			if(val == argValue){
				return true;
			}
		}
		return false;
	}
	boolean longValPassArgument(Measurement measurement, long val){
		if(measurement!=this.measurement){
			return true;
		}
		if (operator==RelationalOperator.GREATER_THAN){
			if (val > argValue){
				return true;
			}
		}
		else if(operator==RelationalOperator.LESS_THAN){
			if(val < argValue){
				return true;
			}
		}
		else if (operator==RelationalOperator.LESS_THAN){
			if(val == argValue){
				return true;
			}
		}
		return false;
	}
	*/
}
